<!-- MV_SEARCH_LINKS.TPL -->
<!-- POR Juan Manuel Rodriguez -->
<input type="hidden" value="{$return_link}" id="return_link"/>
<div style="clear:both;"></div>
<div style="clear:both;">

<div id="right_col" style="right:0px; float:right; height:0px;">
        
            <table cellpadding="0" cellspacing="0" width="135" border="0" align="right">
            <tr><td width="10"></td>
            <td align="right" valign="top">
			<div id="banner_vertical_front" style="width:135px; float: right; class="">
			{if $bannerHid==$smarty.const.ID_CAT_COMPRA}	
					    {php}
							//$section="banner_compra_vertical_01";
                            $section="banner_compra_vertical_04";
							include "ad_get.php";
						{/php}
						<div style="margin-top: 10px;" >
						{php}
							$section="banner_compra_vertical_02";
							include "ad_get.php";
						{/php}
						</div>
						<div style="margin-top: 10px;" >
						{php}
							$section="banner_compra_vertical_03";
							include "ad_get.php";
						{/php}
						</div>	
			{elseif $bannerHid==$smarty.const.ID_CAT_ALQUILER}
			 			{php}
							$section="banner_alquiler_vertical_01";
							include "ad_get.php";
						{/php}
						<div style="margin-top: 10px;" >
						{php}
							$section="banner_alquiler_vertical_02";
							include "ad_get.php";
						{/php}
						</div>
						<div style="margin-top: 10px;" >
						{php}
							$section="banner_alquiler_vertical_03";
							include "ad_get.php";
						{/php}
						</div>
			{elseif $bannerHid==$smarty.const.ID_CAT_SERVICIOS}
			 			{php}
							$section="banner_servicios_vertical_01";
							include "ad_get.php";
						{/php}
						<div style="margin-top: 10px;" >
						{php}
							$section="banner_servicios_vertical_02";
							include "ad_get.php";
						{/php}
						</div>
						<div style="margin-top: 10px;" >
						{php}
							$section="banner_servicios_vertical_03";
							include "ad_get.php";
						{/php}
						</div>
			{/if}
			</div>		
                    </td></tr></table>
		</div>
<div class="titulo_largo" style="width:755px">	
		<h3>{$smarty.const.LA_SEARCH}</h3>
</div>
<div style="clear:both"></div>
<span class="P66" >{$categoryPath}</span>
{if $bannerHid }
<div class="superBannerHorizontal">
 <div id="banner_horizontal"   class="bannerHorizontalCat2" >  	 
 	 <!-- table cellpadding="5" cellspacing="0">
 	 <tbody>
 	 <tr--> 
	 {if $bannerHid==$smarty.const.ID_CAT_COMPRA} 				 				
				    {php}
				    	echo "<div class=\"horizontalIzquierdo\">";
				    	$section="banner_horizonal_01_venta";
						include "ad_get.php";
						echo "</div><div class=\"horizontalDerecho\">";			
						$section="banner_horizonal_02_venta";
						include "ad_get.php";
						echo "</div>";
					{/php}
	{elseif $bannerHid==$smarty.const.ID_CAT_ALQUILER}
	 				{php}
	 					echo "<div class=\"horizontalIzquierdo\">";	
				    	$section="banner_horizonal_01_alquiler";
						include "ad_get.php";
						echo "</div><div class=\"horizontalDerecho\">";		
						$section="banner_horizonal_02_alquiler";
						include "ad_get.php";
						echo "</div>";
					{/php}	
	{elseif $bannerHid==$smarty.const.ID_CAT_SERVICIOS}
	 				{php}
	 					echo "<div class=\"horizontalIzquierdo\">";
				    	$section="banner_horizonal_01_servicios";
						include "ad_get.php";
						echo "</div><div class=\"horizontalDerecho\">";						
						$section="banner_horizonal_01_venta";//$section="banner_horizonal_02_servicios";
						include "ad_get.php";
						echo "</div>";
					{/php}
	{elseif $bannerHid=="ambas"}
	 				{php}
	 					$ventas[0]= "banner_horizonal_01_venta";
						$ventas[1]= "banner_horizonal_02_venta";
						$alquiler[0]= "banner_horizonal_01_alquiler";
						$alquiler[1]= "banner_horizonal_02_alquiler";
	 					echo "<div class=\"horizontalIzquierdo\">";
				    	$section=$ventas[rand(0,1)];
						include "ad_get.php";
						echo "</div><div class=\"horizontalDerecho\">";				
						$section=$alquiler[rand(0,1)];
						include "ad_get.php";
						echo "</div>";
					{/php}					
	{/if}
	<!--  /tr>
	</tbody>
	</table-->	
</div>
</div>
{/if}
<p class="headline">{$smarty.const.LA_SEARCH_DESCR}</p> 
<p>&nbsp;</p>

{if ! $servicios}
<table id="ads-table" cellspacing="0" class="box ads-table mvial-search-table" style="width:765px;">
<tr style="">
<th width="">{$smarty.const.PICTURE_TEXT}</th>
	<th width="30%">{$TITLE_URL} {$smarty.const.TITLE}</a></th>	
	<th width="300">{$MARCA_URL} {$smarty.const.BRAND}</a> {$image_brand}</th>
	<th width="300">{$MODELO_URL} {$smarty.const.MODEL}</a> {$image_model}</th>
	<th width="300">{$TIPO_URL} {$smarty.const.LA_TYPE}</a> {$image_tipo}</th>
	<th width="300">{$ANIO_URL} {$smarty.const.ANIO}</a> {$image_anio}</th>	
	<th width="300">{$UBICACION_URL} {$smarty.const.UBICA}</a> {$image_ubicacion}</th>	
	<th width="">{$PRECIO_URL}Precio</a> {$image_precio}</th>		
</tr>			  

{foreach item=ad from=$ads}
<tr class="{cycle values=",alt"} itemLista {if $ad.PREMIUM}premium{elseif $ad.SPECIAL}special{/if}">
	<td>{$ad.IMAGEYESNO}</td>
	<td>{$ad.TITLE}</td>
	<td>{$ad.MARCA}</td>
	<td>{$ad.MODELO}</td>
	<td>
			{if $ad.cat_grandfatherid == $smarty.const.ID_CAT_COMPRA}
				{$smarty.const.OPERACION_VENTA}
			{else}
				{$smarty.const.OPERACION_ALQUILER}
			{/if}			
	</td>
	<td>{$ad.ANIO}</td>
	<td>{$ad.PROVINCIA}</td>
	<td align="right" style="font-weight:normal"><small>{$ad.MONEDA}</small>&nbsp;{$ad.PRECIO}&nbsp; </td>
</tr>
{/foreach}
</table>
    {literal}
    <script language="javascript">
        /*$(function() {
            $("#ads-table tr.fakeLinks").each(function() {
                var href = $(this).find("a:first").attr("href");
                $(this).click(function() {
                    window.location.href = href;
                });                                
            });
        });*/
    </script>
    {/literal}
{else}
{* Esta seccion muestra un tipo de listado diferente, especial para servicios *}
<table cellspacing="0" class="box ads-table mvial-search-table" style="width:765px">
<tr style="">
	<th width="20%">{$CATEGORY_URL} {$smarty.const.CATEGORY}</a> {$image_cat}</th>
	<th width="20%">{$UBICACION_URL}{$smarty.const.EF_UBICACION}</a> {$image_ubicacion}</th>
	<th width="300">{$smarty.const.DESCRIPTION}</th>
	{*<th width="300">{$smarty.const.DESCRIPTION}</a></th>*}
	{*
	{foreach item=extra from=$EXTRA_CAPTION_ARRAY} 
		<th>{$extra.url}{$extra.caption|truncate:15:"...":true}</a> {$extra.sort_img}</th>
	{/foreach}
	*}
	{*
	<th width="10%">{$DATE_URL} {$smarty.const.DATE_ADDED}</a> {$image_date}</th>
	<th width="10%">{$EXPIREDATE_URL} {$smarty.const.LA_AD_EXPIRE}</a> {$image_expire}</th>
	<th width="20%">{$GRADE_URL} {$smarty.const.LA_GRADE}</a> {$image_grade}</th>
	*}
	{*<th width="">{$PRECIO_URL}Precio</a> {$image_precio}</th>
	<th width="">{$PICTURE_URL} {$smarty.const.PICTURE_TEXT}</a> {$image_picture}</th>*}
</tr>			  

{foreach item=ad from=$ads}  
<tr class="{cycle values=",alt"}">
 <td class="">{$ad.CATEGORYNAME}&nbsp;</td> 
 <td class="">{$ad.PROVINCIA}&nbsp;</td>
 <td class="">
 	<div class="listar_servicios">
 		<table cellspacing="0" class="" style="clear:both;" width="100%" >
 		<tr rowspan="2">	
 			<td colspan="2">{$ad.IMAGEYESNO}</td> 			
 			<td colspan="2">
 			<a href="{$ad.LINK}" title="{$ad.TITLE|escape}">
				{if $ad.SPECIAL}<b>{/if}{$ad.TITLE|truncate:50:"...":true}{if $ad.SPECIAL}</b>{/if}</a>
			<br/>
 				 {$smarty.const.LA_PRICE}&nbsp;<small>{$ad.MONEDA}</small>&nbsp;{$ad.PRECIO}		
 			&nbsp;</td> 			
 		</tr> 		
 		<tr></tr>
 		<tr>
 			<td colspan="4">
 			{if $ad.SPECIAL}<b>{/if}{$ad.DESCRIPTION|truncate:100:"...":true|strip_tags:""}{if $ad.SPECIAL}</b>{/if}
 			&nbsp;</td>
 		</tr>	
	 </table>
	</div>
</td>

{/foreach} 

</tr>

</table>
{/if}

	<table style="margin: 17px auto 0pt; border-collapse: collapse; text-align: left; direction: ltr;" style="clear:both;">
	<tbody>
		<tr valign="top">	
			{if $prev_url}
				<td>	 
					<a href="{$prev_url}" class="button">&lt; {$smarty.const.PREVIOUS_ADS} {$NUM_PER_PAGE}</a>
				</td> 
			{/if}	
			{foreach item=page from=$listOfPages}
				<td>	
					{if $page.isCurrent}
						<label class="currentPage">{$page.name}</label>
					{else}
						<a class="button" href="{$page.url}">{$page.name}</a>						
					{/if}
				</td>
			{/foreach}	
			{if $next_url}
				<td>	 	
					<a href="{$next_url}" class="button">{$smarty.const.NEXT_ADS} {$NUM_PER_PAGE} &gt;</a>
				</td>			 
			{/if}
		</tr>
	</tbody>
	</table>
</div>
<!-- //MV_SEARCH_LINKS.TPL -->
